package com.example.dziennikposilkow;

import org.xmlpull.v1.XmlPullParser;

import com.example.dziennikposilkow.importXML.XMLReader;
import com.example.dziennikposilkow.model.Products;

public class Singleton {
		
	private static Singleton instance;
	public Products[] products;
	public static void initInstance(){
		if (instance == null){
			// Create the instance
			instance = new Singleton();
			
		}
	}
	public static Singleton getInstance(){
	  // Return the instance
		return instance;
	}

	private Singleton(){
	    // Constructor hidden because this is a singleton
	}
	
/*	public void readData(XmlPullParser xpp){
		XMLReader xmlReader = new XMLReader();
		this.products = new Products[xmlReader.subcategories.length];
		for (int i = 0; i < xmlReader.subcategories.length; i++){
			XmlPullParser xpp2 = xpp;
			this.products[i] = new XMLReader()//.readData(xpp, xmlReader.subcategories[i]);
												.readData(xpp2, xmlReader.subcategories[i]);
		}      
	}*/
}
